package cn.com.roy.thread.t7_6.threadgroup2;

import cn.com.roy.thread.t7_6.threadgroup1.MyThread;

public class Run {

    public static void main(String[] args) throws InterruptedException {
        ThreadGroup group = new MyThreadGroup("我的线程组");
        MyThread[] myThread = new MyThread[2];
        for (int i = 0; i < myThread.length; i++) {
            myThread[i] = new MyThread(group,"线程" + (i+1),"1");
            myThread[i].start();
        }

        MyThread newT = new MyThread(group,"报错线程","a");
        newT.start();
    }
}
